package study.lagou.com.sqlSession;

import study.lagou.com.pojo.Configuration;
import study.lagou.com.pojo.MappedStatement;

import java.util.List;

public interface Executor {

    /**
     * 查询方法
     * @param configuration
     * @param mappedStatement
     * @param params
     * @param <E>
     * @return
     * @throws Exception
     */
    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

    /**
     * 更新方法，主要用于实现统一更新、删除和添加方法
     * @param configuration
     * @param mappedStatement
     * @param params
     */
    Integer update(Configuration configuration,MappedStatement mappedStatement,Object... params) throws Exception;
}
